var app = getApp();
var WxParse = require('../../../wxParse/wxParse.js');
Page({
  data:{
    content: [],
  },
  onShow:function(){
      swan.setPageInfo && swan.setPageInfo({
        title: '',
        keywords: '',
        description: '',
    })
  },
  onLoad:function(options){
    var that = this
    var id = options.id;
    var mid = options.mid;
    swan.request({
            url: app.util.url('s='+mid+'&c=show&id='+id), 
            method: 'GET',
            dataType: 'json',
            header: {
                'content-type': 'application/json' 
            },
            success: function (res) {
                //console.log(res);
                if (res.data.code) {
                    // 载入成功
                    WxParse.wxParse('wxParseData', 'html', res.data.data.content, that, 10);
                    that.setData({
                        content: res.data.data
                    }),
                    swan.setNavigationBarTitle({
                        title: res.data.data.title,
                    })
                    swan.setPageInfo && swan.setPageInfo({
                        title: res.data.data.meta_title,
                        keywords: res.data.data.meta_keywords,
                        description: res.data.data.meta_description
                    })
                }
            }
    });
    

  },


  
})